# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=httpry
pkgver=0.1.8
pkgrel=4
groups=('blackarch' 'blackarch-sniffer')
pkgdesc='A specialized packet sniffer designed for displaying and logging HTTP traffic.'
arch=('x86_64' 'aarch64')
url='http://dumpsterventures.com/jason/httpry/'
license=('GPL2')
depends=('libpcap')
makedepends=('gzip')
source=("https://dl.packetstormsecurity.net/sniffers/$pkgname-$pkgver.tar.gz")
DLAGENTS=("https::/usr/bin/curl -k -o %o %u")
sha512sums=('28d9fc37229e8b47711227762134e5b6e81bde0a44947f2e527771da2d042ba7e7c38b1ec205808a9e444e1235c91932ba16df4a31cc3d739c6474b25e149636')

build() {
  cd "$pkgname-$pkgver"

  make
}

package() {
  cd "$pkgname-$pkgver"

  install -dm 755 "$pkgdir/usr/share/doc/$pkgname"

  cd doc

  install -Dm 644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" AUTHORS ChangeLog \
    README format-string method-string perl-tools

  cd ..

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  gzip "$pkgname.1" && install -Dm 644 "$pkgname.1.gz" \
    "$pkgdir/usr/share/man/man1/$pkgname.1.gz"
}

